#ifndef els_unit_h
#define els_unit_h

#include "els_object.h"


#define node(t,i)	(&(t)->node[i])
#define key(n)		(&(n)->key)
#define val(n)		(&(n)->val)

Hash *els_Unit_new (els_VmObj *L, int nhash);
void els_Unit_free (els_VmObj *L, Hash *t);
const StackObj *els_Unit_get (els_VmObj *L, const Hash *t, const StackObj *key);
const StackObj *els_Unit_getnum (const Hash *t, Number key);
const StackObj *els_Unit_getstr (const Hash *t, TString *key);
void els_Unit_remove (Hash *t, StackObj *key);
StackObj *els_Unit_set (els_VmObj *L, Hash *t, const StackObj *key);
Node * els_Unit_next (els_VmObj *L, const Hash *t, const StackObj *r);
StackObj *els_Unit_setint (els_VmObj *L, Hash *t, int key);
void els_Unit_setstrnum (els_VmObj *L, Hash *t, TString *key, Number val);
unsigned long els_Unit_hash (els_VmObj *L, const StackObj *key);
const StackObj *els_Unit_getglobal (els_VmObj *L, const char *name);


Node *els_Unit_mainposition (const Hash *t, const StackObj *key);


#endif
